package day240509.p1;

public class FinalVariable {
       final int id;//Variable 'id' might not have been initialized
       final static int AGE ;
       public FinalVariable() {
              System.out.println("执行调用了空参构造器");
//              id = 1;
      }
//       public FinalVariable(int id) {
//             this.id=id;
//       }

       { System.out.println("执行调用了block");
              id=3;
       }
       static{
              AGE=19;
              }


       public static void main(String[] args) {
           final int a = 0;
           // Cannot assign a value to final variable 'a'
//           a = 3;
}
    public void parameterWithFinalTest1(final int i) {
//        i++;
    }
    public void parameterWithFinalTest2(final MyClass myClass) {
        myClass.i++;
    }
}

class MyClass {
    int i;
    }